cmake_minimum_required(VERSION 3.7)
project(bsys)

set(CMAKE_CXX_STANDARD 11)

if(buildsw)
    message("---------------cross tool---------------------")
    set(CMAKE_FIND_ROOT_PATH ${USR_FIND_ROOT} )
    set(CMAKE_CXX_COMPILER ${USR_CXX_COMPILER} )
endif()

set(SRC_DIR_USER ./)
set(INC_DIR_USER ../../inc/sys/)
if (buildsw)
    set(LIBRARY_OUTPUT_PATH   ../../../bin/mipi)
else(NOT buildsw)
    set(LIBRARY_OUTPUT_PATH   ../../../bin/gcc)
endif ()


include_directories(../../inc/ )

set(SOURCE_FILES
        ${SRC_DIR_USER}bSysNode.cpp
        ${INC_DIR_USER}bSysNode.h
        ${SRC_DIR_USER}bSysComposit.cpp
        ${INC_DIR_USER}bSysComposit.h )

#add_executable(bsys ${SOURCE_FILES})
add_library(bsys SHARED ${SOURCE_FILES})
TARGET_LINK_LIBRARIES(bsys pthread)
